﻿// Copyright © 2008, EMC Corporation.
// Redistribution and use in source and binary forms, with or without modification, 
// are permitted provided that the following conditions are met:
//
//     + Redistributions of source code must retain the above copyright notice, 
//       this list of conditions and the following disclaimer.
//     + Redistributions in binary form must reproduce the above copyright 
//       notice, this list of conditions and the following disclaimer in the 
//       documentation and/or other materials provided with the distribution.
//     + The name of EMC Corporation may not be used to endorse or promote 
//       products derived from this software without specific prior written 
//       permission.
//
//      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
//      "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 
//      TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
//      PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 
//      BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
//      CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
//      SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
//      INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
//      CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
//      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
//      POSSIBILITY OF SUCH DAMAGE.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EsuSysMgmtApiLib
{
    public interface EsuApi
    {
        #region SystemManagementApis

        //NODE and RMG MANAGEMENT
        /// <summary>
        /// Get list of nodes in the Atmos Cloud
        /// </summary>
        /// <param name="SysAdminP">The password of the username invoking the call</param>
        /// <param name="SysAdminU">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string GetNodeList(string RMGname, string SysAdminU, string SysAdminP);
        /// <summary>
        /// Get information about the underlying NODE in an RMG
        /// </summary>
        /// <param name="RMGName">The name of the RMG</param>
        /// <param name="NODEname">The name of the Node within the RMG</param>
        /// <param name="SysAdminP">The password of the username invoking the call</param>
        /// <param name="SysAdminU">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string GetNodeInfo(string RMGname, string NODEname, string SysAdminU, string SysAdminP);

        /// <summary>
        /// Get information about the underlying RMG
        /// </summary>
        /// <param name="rmgName">The name of the RMG</param>
        /// <param name="SysAdminP">The password of the username invoking the call</param>
        /// <param name="SysAdminU">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string GetRMGInfo(string rmgName, string SysAdminU, string SysAdminP);

        /// <summary>
        /// Get information about RMGs in your cloud
        /// </summary>
        /// <param name="SysAdminP">The password of the username invoking the call</param>
        /// <param name="SysAdminU">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string GetRMGList(string SysAdminU, string SysAdminP);
        //END NODE and RMG MANAGEMENT


        // TENANTS
        /// <summary>
        /// List Subtenants
        /// </summary>
        /// <param name="tenant">Tenant Name</param>
        /// <param name="tenantpassword">The password of the username invoking the call</param>
        /// <param name="tenantadmin">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string GetSubTenantList(string tenant, string tenantadmin, string tenantpassword);

        /// <summary>
        /// Read Subtenants
        /// </summary>
        /// <param name="subtenant">sub tenant name</param>
        /// <param name="tenant">Tenant Name</param>
        /// <param name="tenantpassword">The password of the username invoking the call</param>
        /// <param name="tenantadmin">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string ReadSubTenant(string tenant, string subtenant, string tenantadmin, string tenantpassword);
        // END TENANTS

        //MANAGING UIDS
        /// <summary>
        /// List UIDS
        /// </summary>
        /// <param name="subtenant">sub tenant name</param>
        /// <param name="tenant">Tenant Name</param>
        /// <param name="tenantpassword">The password of the username invoking the call</param>
        /// <param name="tenantadmin">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string GetUIDList(string tenant, string subtenant, string tenantadmin, string tenantpassword);

        /// <summary>
        /// Read Shared Secret from UID
        /// </summary>
        /// <param name="subtenant">sub tenant name</param>
        /// <param name="tenant">Tenant Name</param>
        /// <param name="tenantpassword">The password of the username invoking the call</param>
        /// <param name="tenantadmin">The username invoking the call</param>
        /// <param name="uid">The UID to pull the shared secret for</param>
        /// <returns>string variable (XML format)</returns>
        string ReadSharedSecret(string tenant, string subtenant, string tenantadmin, string tenantpassword, string uid);
        //END MANAGING UIDS



        //MANAGING POLICIES
        /// <summary>
        /// List Policies
        /// </summary>
        /// <param name="tenant">Tenant Name</param>
        /// <param name="tenantpassword">The password of the username invoking the call</param>
        /// <param name="tenantadmin">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string GetPolicySelectorList(string tenant, string tenantadmin, string tenantpassword);

        /// <summary>
        /// Get Policy Information
        /// </summary>
        /// <param name="policyselectorname">policy selector name</param>
        /// <param name="tenant">Tenant Name</param>
        /// <param name="tenantpassword">The password of the username invoking the call</param>
        /// <param name="tenantadmin">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string GetPolicySelectorInfo(string policyselectorname, string tenant, string tenantadmin, string tenantpassword);
        //END MANAGING POLICIES


        //ATMOS STORAGE CONSUMPTION
        /// <summary>
        /// Get Storage Consumption at the TENANT level
        /// </summary>
        /// <param name="tenant">Tenant Name</param>
        /// <param name="tenantpassword">The password of the username invoking the call</param>
        /// <param name="tenantadmin">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string GetStorageConsumption(string tenant, string tenantadmin, string tenantpassword);
        /// <summary>
        /// Get Storage Consumption at the UID level
        /// </summary>
        /// <param name="tenant">Tenant Name</param>
        /// <param name="subtenant">Sub-Tenant Name</param>
        /// <param name="tenantpassword">The password of the username invoking the call</param>
        /// <param name="tenantadmin">The username invoking the call</param>
        /// <param name="uid">The UID</param>
        /// <returns>string variable (XML format)</returns>
        string GetStorageConsumption(string tenant, string subtenant, string tenantadmin, string tenantpassword, string uid);
        /// <summary>
        /// Get Storage Consumption at the SubTenantLevel
        /// </summary>
        /// <param name="tenant">Tenant Name</param>
        /// <param name="subtenant">Sub-Tenant Name</param>
        /// <param name="tenantpassword">The password of the username invoking the call</param>
        /// <param name="tenantadmin">The username invoking the call</param>
        /// <returns>string variable (XML format)</returns>
        string GetStorageConsumption(string tenant, string subtenant, string tenantadmin, string tenantpassword);
        //END ATMOS STORAGE CONSUMPTION
        #endregion
    }
}
